<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>clear</title>
    <style type="text/css">
        span{
            height: 50px;
            width: 110px;
        }
        #span1{
            float: left;
            border:solid 3px blue;
        }
        /*#span2{*/
            /*float: left;*/
            /*border:solid 3px red;*/
            /*clear:left;!**清除左侧浮动**!*/
        /*}*/
        #span2{
            float: left;
            border:solid 3px red;
            clear:right;/**清除左侧浮动**/
        }
        #span3{
            float: left;
            border:solid 3px green;
        }
    </style>
</head>
<body>
<span id="span1">span1元素浮动</span>
<span id="span2">span2元素浮动</span>
<span id="span3">span3元素浮动</span>
</body>
</html>